/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.ez2find.model;

import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

/**
 *
 * @author Owner
 */
@NamedQueries(value={@NamedQuery(name="listAllServices", query="SELECT s FROM Service s"),
                     @NamedQuery(name="lastServiceCode", query="SELECT MAX(s.code) FROM Service s")})

@Entity
public class Service extends Post implements Serializable{

    //Permissions
    private boolean othersContact;
    @ManyToOne()
    private CategoriaServicio serviceCategorie;
    
    public boolean isOthersContact() {
        return othersContact;
    }

    public void setOthersContact(boolean othersContact) {
        this.othersContact = othersContact;
    }

    public CategoriaServicio getServiceCategorie() {
        return serviceCategorie;
    }

    public void setServiceCategorie(CategoriaServicio serviceCategorie) {
        this.serviceCategorie = serviceCategorie;
    }

}
